﻿using System;
using System.Collections.Generic;
using System.Linq;
using Infrastructure;
using OpenAuth.App.Interface;
using OpenAuth.App.Request;
using OpenAuth.App.Response;
using OpenAuth.Repository.Domain;
using OpenAuth.Repository.Interface;


namespace OpenAuth.App
{
    public class HsLogApp : BaseApp<HsLog>
    {
        public void InsertLog(int djh)
        {
            HsLog hl = new HsLog();
            hl.djh = djh;
            hl.cstate = 1;
            hl.dysj = DateTime.Now;
            Repository.Add(hl);
        }
        public HsLog QueryByDJH(int djh)
        {
             var cc=Repository.FindSingle(x => x.djh == djh && x.cstate == 1);
            return cc;
        }

       
       

        public HsLogApp(IUnitWork unitWork, IRepository<HsLog> repository
            ) : base(unitWork, repository)
        {
            
           
        }
    }
}